package com.apartment.own.service.impl;

import java.util.List;
import com.apartment.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.apartment.own.mapper.OwnBaseTableMapper;
import com.apartment.own.domain.OwnBaseTable;
import com.apartment.own.service.IOwnBaseTableService;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author @Dog_E
 * @date 2020-08-28
 */
@Service
public class OwnBaseTableServiceImpl extends ServiceImpl<OwnBaseTableMapper,OwnBaseTable> implements IOwnBaseTableService
{
    @Autowired
    private OwnBaseTableMapper ownBaseTableMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public OwnBaseTable selectOwnBaseTableById(Long id)
    {
        return ownBaseTableMapper.selectOwnBaseTableById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param ownBaseTable 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<OwnBaseTable> selectOwnBaseTableList(OwnBaseTable ownBaseTable)
    {
        return ownBaseTableMapper.selectOwnBaseTableList(ownBaseTable);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param ownBaseTable 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertOwnBaseTable(OwnBaseTable ownBaseTable)
    {
        ownBaseTable.setCreateTime(DateUtils.getNowDate());
        return ownBaseTableMapper.insertOwnBaseTable(ownBaseTable);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param ownBaseTable 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateOwnBaseTable(OwnBaseTable ownBaseTable)
    {
        ownBaseTable.setUpdateTime(DateUtils.getNowDate());
        return ownBaseTableMapper.updateOwnBaseTable(ownBaseTable);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteOwnBaseTableByIds(Long[] ids)
    {
        return ownBaseTableMapper.deleteOwnBaseTableByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteOwnBaseTableById(Long id)
    {
        return ownBaseTableMapper.deleteOwnBaseTableById(id);
    }
}
